<template>
	<view
		class="xbd-small-card"
		:style="'background-image: url(../../static/images/common/' + bg + '.png);'"
		@click="clickSmallCard"
	>
		<view class="num">
			{{ num }}
		</view>
		<view class="title">
			{{ title }}
		</view>
	</view>
</template>

<script>
	export default {
		name: 'XbdSmallCard',
		props: {
			num: Number,
			title: String,
			bg: String
		},
		methods: {
			clickSmallCard() {
				this.$emit('clickSmallCard');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.xbd-small-card {
		display: flex;
		flex-direction: column;
		justify-content: space-evenly;
		align-items: center;
		
		width: 202rpx;
		height: 60px;
		border-radius: 12rpx;
		
		color: #ffffff;
		background-size: 100% 100%;
		background-repeat: no-repeat;
		
		box-sizing: border-box;
		.num {
			font-size: 24px;
		}
		.title {
			font-size: 14px;
		}
	}
</style>
